﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace Spencen.Mobile.UI.Animations
{
    public class PointAnimation : Animation<Point>
    {
        public PointAnimation( object target, string propertyName, TimeSpan duration )
            : base( target, propertyName, duration )
        {
        }

        public override Point CurrentValue
        {
            get
            {
                return new Point(
                    OriginalValue.X + (int) (( FinalValue.X - OriginalValue.X ) * AdjustedPercentageComplete),
                    OriginalValue.Y + (int) (( FinalValue.Y - OriginalValue.Y ) * AdjustedPercentageComplete ));
            }
        }
    }
}
